package com.quanyan.riding.entity.db;

import com.quanyan.common.Plugin.Page;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class TbRidingRecordExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    protected Page page;

    public TbRidingRecordExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setPage(Page page) {
        this.page=page;
    }

    public Page getPage() {
        return page;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andUserIdIsNull() {
            addCriterion("user_id is null");
            return (Criteria) this;
        }

        public Criteria andUserIdIsNotNull() {
            addCriterion("user_id is not null");
            return (Criteria) this;
        }

        public Criteria andUserIdEqualTo(String value) {
            addCriterion("user_id =", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotEqualTo(String value) {
            addCriterion("user_id <>", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdGreaterThan(String value) {
            addCriterion("user_id >", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdGreaterThanOrEqualTo(String value) {
            addCriterion("user_id >=", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLessThan(String value) {
            addCriterion("user_id <", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLessThanOrEqualTo(String value) {
            addCriterion("user_id <=", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLike(String value) {
            addCriterion("user_id like", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotLike(String value) {
            addCriterion("user_id not like", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdIn(List<String> values) {
            addCriterion("user_id in", values, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotIn(List<String> values) {
            addCriterion("user_id not in", values, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdBetween(String value1, String value2) {
            addCriterion("user_id between", value1, value2, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotBetween(String value1, String value2) {
            addCriterion("user_id not between", value1, value2, "userId");
            return (Criteria) this;
        }

        public Criteria andMinAltitudeIsNull() {
            addCriterion("min_altitude is null");
            return (Criteria) this;
        }

        public Criteria andMinAltitudeIsNotNull() {
            addCriterion("min_altitude is not null");
            return (Criteria) this;
        }

        public Criteria andMinAltitudeEqualTo(Float value) {
            addCriterion("min_altitude =", value, "minAltitude");
            return (Criteria) this;
        }

        public Criteria andMinAltitudeNotEqualTo(Float value) {
            addCriterion("min_altitude <>", value, "minAltitude");
            return (Criteria) this;
        }

        public Criteria andMinAltitudeGreaterThan(Float value) {
            addCriterion("min_altitude >", value, "minAltitude");
            return (Criteria) this;
        }

        public Criteria andMinAltitudeGreaterThanOrEqualTo(Float value) {
            addCriterion("min_altitude >=", value, "minAltitude");
            return (Criteria) this;
        }

        public Criteria andMinAltitudeLessThan(Float value) {
            addCriterion("min_altitude <", value, "minAltitude");
            return (Criteria) this;
        }

        public Criteria andMinAltitudeLessThanOrEqualTo(Float value) {
            addCriterion("min_altitude <=", value, "minAltitude");
            return (Criteria) this;
        }

        public Criteria andMinAltitudeIn(List<Float> values) {
            addCriterion("min_altitude in", values, "minAltitude");
            return (Criteria) this;
        }

        public Criteria andMinAltitudeNotIn(List<Float> values) {
            addCriterion("min_altitude not in", values, "minAltitude");
            return (Criteria) this;
        }

        public Criteria andMinAltitudeBetween(Float value1, Float value2) {
            addCriterion("min_altitude between", value1, value2, "minAltitude");
            return (Criteria) this;
        }

        public Criteria andMinAltitudeNotBetween(Float value1, Float value2) {
            addCriterion("min_altitude not between", value1, value2, "minAltitude");
            return (Criteria) this;
        }

        public Criteria andMaxAltitudeIsNull() {
            addCriterion("max_altitude is null");
            return (Criteria) this;
        }

        public Criteria andMaxAltitudeIsNotNull() {
            addCriterion("max_altitude is not null");
            return (Criteria) this;
        }

        public Criteria andMaxAltitudeEqualTo(Float value) {
            addCriterion("max_altitude =", value, "maxAltitude");
            return (Criteria) this;
        }

        public Criteria andMaxAltitudeNotEqualTo(Float value) {
            addCriterion("max_altitude <>", value, "maxAltitude");
            return (Criteria) this;
        }

        public Criteria andMaxAltitudeGreaterThan(Float value) {
            addCriterion("max_altitude >", value, "maxAltitude");
            return (Criteria) this;
        }

        public Criteria andMaxAltitudeGreaterThanOrEqualTo(Float value) {
            addCriterion("max_altitude >=", value, "maxAltitude");
            return (Criteria) this;
        }

        public Criteria andMaxAltitudeLessThan(Float value) {
            addCriterion("max_altitude <", value, "maxAltitude");
            return (Criteria) this;
        }

        public Criteria andMaxAltitudeLessThanOrEqualTo(Float value) {
            addCriterion("max_altitude <=", value, "maxAltitude");
            return (Criteria) this;
        }

        public Criteria andMaxAltitudeIn(List<Float> values) {
            addCriterion("max_altitude in", values, "maxAltitude");
            return (Criteria) this;
        }

        public Criteria andMaxAltitudeNotIn(List<Float> values) {
            addCriterion("max_altitude not in", values, "maxAltitude");
            return (Criteria) this;
        }

        public Criteria andMaxAltitudeBetween(Float value1, Float value2) {
            addCriterion("max_altitude between", value1, value2, "maxAltitude");
            return (Criteria) this;
        }

        public Criteria andMaxAltitudeNotBetween(Float value1, Float value2) {
            addCriterion("max_altitude not between", value1, value2, "maxAltitude");
            return (Criteria) this;
        }

        public Criteria andMileageIsNull() {
            addCriterion("mileage is null");
            return (Criteria) this;
        }

        public Criteria andMileageIsNotNull() {
            addCriterion("mileage is not null");
            return (Criteria) this;
        }

        public Criteria andMileageEqualTo(Double value) {
            addCriterion("mileage =", value, "mileage");
            return (Criteria) this;
        }

        public Criteria andMileageNotEqualTo(Double value) {
            addCriterion("mileage <>", value, "mileage");
            return (Criteria) this;
        }

        public Criteria andMileageGreaterThan(Double value) {
            addCriterion("mileage >", value, "mileage");
            return (Criteria) this;
        }

        public Criteria andMileageGreaterThanOrEqualTo(Double value) {
            addCriterion("mileage >=", value, "mileage");
            return (Criteria) this;
        }

        public Criteria andMileageLessThan(Double value) {
            addCriterion("mileage <", value, "mileage");
            return (Criteria) this;
        }

        public Criteria andMileageLessThanOrEqualTo(Double value) {
            addCriterion("mileage <=", value, "mileage");
            return (Criteria) this;
        }

        public Criteria andMileageIn(List<Double> values) {
            addCriterion("mileage in", values, "mileage");
            return (Criteria) this;
        }

        public Criteria andMileageNotIn(List<Double> values) {
            addCriterion("mileage not in", values, "mileage");
            return (Criteria) this;
        }

        public Criteria andMileageBetween(Double value1, Double value2) {
            addCriterion("mileage between", value1, value2, "mileage");
            return (Criteria) this;
        }

        public Criteria andMileageNotBetween(Double value1, Double value2) {
            addCriterion("mileage not between", value1, value2, "mileage");
            return (Criteria) this;
        }

        public Criteria andClimbDistanceIsNull() {
            addCriterion("climb_distance is null");
            return (Criteria) this;
        }

        public Criteria andClimbDistanceIsNotNull() {
            addCriterion("climb_distance is not null");
            return (Criteria) this;
        }

        public Criteria andClimbDistanceEqualTo(Double value) {
            addCriterion("climb_distance =", value, "climbDistance");
            return (Criteria) this;
        }

        public Criteria andClimbDistanceNotEqualTo(Double value) {
            addCriterion("climb_distance <>", value, "climbDistance");
            return (Criteria) this;
        }

        public Criteria andClimbDistanceGreaterThan(Double value) {
            addCriterion("climb_distance >", value, "climbDistance");
            return (Criteria) this;
        }

        public Criteria andClimbDistanceGreaterThanOrEqualTo(Double value) {
            addCriterion("climb_distance >=", value, "climbDistance");
            return (Criteria) this;
        }

        public Criteria andClimbDistanceLessThan(Double value) {
            addCriterion("climb_distance <", value, "climbDistance");
            return (Criteria) this;
        }

        public Criteria andClimbDistanceLessThanOrEqualTo(Double value) {
            addCriterion("climb_distance <=", value, "climbDistance");
            return (Criteria) this;
        }

        public Criteria andClimbDistanceIn(List<Double> values) {
            addCriterion("climb_distance in", values, "climbDistance");
            return (Criteria) this;
        }

        public Criteria andClimbDistanceNotIn(List<Double> values) {
            addCriterion("climb_distance not in", values, "climbDistance");
            return (Criteria) this;
        }

        public Criteria andClimbDistanceBetween(Double value1, Double value2) {
            addCriterion("climb_distance between", value1, value2, "climbDistance");
            return (Criteria) this;
        }

        public Criteria andClimbDistanceNotBetween(Double value1, Double value2) {
            addCriterion("climb_distance not between", value1, value2, "climbDistance");
            return (Criteria) this;
        }

        public Criteria andMaxSpeedIsNull() {
            addCriterion("max_speed is null");
            return (Criteria) this;
        }

        public Criteria andMaxSpeedIsNotNull() {
            addCriterion("max_speed is not null");
            return (Criteria) this;
        }

        public Criteria andMaxSpeedEqualTo(Float value) {
            addCriterion("max_speed =", value, "maxSpeed");
            return (Criteria) this;
        }

        public Criteria andMaxSpeedNotEqualTo(Float value) {
            addCriterion("max_speed <>", value, "maxSpeed");
            return (Criteria) this;
        }

        public Criteria andMaxSpeedGreaterThan(Float value) {
            addCriterion("max_speed >", value, "maxSpeed");
            return (Criteria) this;
        }

        public Criteria andMaxSpeedGreaterThanOrEqualTo(Float value) {
            addCriterion("max_speed >=", value, "maxSpeed");
            return (Criteria) this;
        }

        public Criteria andMaxSpeedLessThan(Float value) {
            addCriterion("max_speed <", value, "maxSpeed");
            return (Criteria) this;
        }

        public Criteria andMaxSpeedLessThanOrEqualTo(Float value) {
            addCriterion("max_speed <=", value, "maxSpeed");
            return (Criteria) this;
        }

        public Criteria andMaxSpeedIn(List<Float> values) {
            addCriterion("max_speed in", values, "maxSpeed");
            return (Criteria) this;
        }

        public Criteria andMaxSpeedNotIn(List<Float> values) {
            addCriterion("max_speed not in", values, "maxSpeed");
            return (Criteria) this;
        }

        public Criteria andMaxSpeedBetween(Float value1, Float value2) {
            addCriterion("max_speed between", value1, value2, "maxSpeed");
            return (Criteria) this;
        }

        public Criteria andMaxSpeedNotBetween(Float value1, Float value2) {
            addCriterion("max_speed not between", value1, value2, "maxSpeed");
            return (Criteria) this;
        }

        public Criteria andAvgSpeedIsNull() {
            addCriterion("avg_speed is null");
            return (Criteria) this;
        }

        public Criteria andAvgSpeedIsNotNull() {
            addCriterion("avg_speed is not null");
            return (Criteria) this;
        }

        public Criteria andAvgSpeedEqualTo(Float value) {
            addCriterion("avg_speed =", value, "avgSpeed");
            return (Criteria) this;
        }

        public Criteria andAvgSpeedNotEqualTo(Float value) {
            addCriterion("avg_speed <>", value, "avgSpeed");
            return (Criteria) this;
        }

        public Criteria andAvgSpeedGreaterThan(Float value) {
            addCriterion("avg_speed >", value, "avgSpeed");
            return (Criteria) this;
        }

        public Criteria andAvgSpeedGreaterThanOrEqualTo(Float value) {
            addCriterion("avg_speed >=", value, "avgSpeed");
            return (Criteria) this;
        }

        public Criteria andAvgSpeedLessThan(Float value) {
            addCriterion("avg_speed <", value, "avgSpeed");
            return (Criteria) this;
        }

        public Criteria andAvgSpeedLessThanOrEqualTo(Float value) {
            addCriterion("avg_speed <=", value, "avgSpeed");
            return (Criteria) this;
        }

        public Criteria andAvgSpeedIn(List<Float> values) {
            addCriterion("avg_speed in", values, "avgSpeed");
            return (Criteria) this;
        }

        public Criteria andAvgSpeedNotIn(List<Float> values) {
            addCriterion("avg_speed not in", values, "avgSpeed");
            return (Criteria) this;
        }

        public Criteria andAvgSpeedBetween(Float value1, Float value2) {
            addCriterion("avg_speed between", value1, value2, "avgSpeed");
            return (Criteria) this;
        }

        public Criteria andAvgSpeedNotBetween(Float value1, Float value2) {
            addCriterion("avg_speed not between", value1, value2, "avgSpeed");
            return (Criteria) this;
        }

        public Criteria andRidingTimeIsNull() {
            addCriterion("riding_time is null");
            return (Criteria) this;
        }

        public Criteria andRidingTimeIsNotNull() {
            addCriterion("riding_time is not null");
            return (Criteria) this;
        }

        public Criteria andRidingTimeEqualTo(Integer value) {
            addCriterion("riding_time =", value, "ridingTime");
            return (Criteria) this;
        }

        public Criteria andRidingTimeNotEqualTo(Integer value) {
            addCriterion("riding_time <>", value, "ridingTime");
            return (Criteria) this;
        }

        public Criteria andRidingTimeGreaterThan(Integer value) {
            addCriterion("riding_time >", value, "ridingTime");
            return (Criteria) this;
        }

        public Criteria andRidingTimeGreaterThanOrEqualTo(Integer value) {
            addCriterion("riding_time >=", value, "ridingTime");
            return (Criteria) this;
        }

        public Criteria andRidingTimeLessThan(Integer value) {
            addCriterion("riding_time <", value, "ridingTime");
            return (Criteria) this;
        }

        public Criteria andRidingTimeLessThanOrEqualTo(Integer value) {
            addCriterion("riding_time <=", value, "ridingTime");
            return (Criteria) this;
        }

        public Criteria andRidingTimeIn(List<Integer> values) {
            addCriterion("riding_time in", values, "ridingTime");
            return (Criteria) this;
        }

        public Criteria andRidingTimeNotIn(List<Integer> values) {
            addCriterion("riding_time not in", values, "ridingTime");
            return (Criteria) this;
        }

        public Criteria andRidingTimeBetween(Integer value1, Integer value2) {
            addCriterion("riding_time between", value1, value2, "ridingTime");
            return (Criteria) this;
        }

        public Criteria andRidingTimeNotBetween(Integer value1, Integer value2) {
            addCriterion("riding_time not between", value1, value2, "ridingTime");
            return (Criteria) this;
        }

        public Criteria andCaloriesIsNull() {
            addCriterion("calories is null");
            return (Criteria) this;
        }

        public Criteria andCaloriesIsNotNull() {
            addCriterion("calories is not null");
            return (Criteria) this;
        }

        public Criteria andCaloriesEqualTo(Integer value) {
            addCriterion("calories =", value, "calories");
            return (Criteria) this;
        }

        public Criteria andCaloriesNotEqualTo(Integer value) {
            addCriterion("calories <>", value, "calories");
            return (Criteria) this;
        }

        public Criteria andCaloriesGreaterThan(Integer value) {
            addCriterion("calories >", value, "calories");
            return (Criteria) this;
        }

        public Criteria andCaloriesGreaterThanOrEqualTo(Integer value) {
            addCriterion("calories >=", value, "calories");
            return (Criteria) this;
        }

        public Criteria andCaloriesLessThan(Integer value) {
            addCriterion("calories <", value, "calories");
            return (Criteria) this;
        }

        public Criteria andCaloriesLessThanOrEqualTo(Integer value) {
            addCriterion("calories <=", value, "calories");
            return (Criteria) this;
        }

        public Criteria andCaloriesIn(List<Integer> values) {
            addCriterion("calories in", values, "calories");
            return (Criteria) this;
        }

        public Criteria andCaloriesNotIn(List<Integer> values) {
            addCriterion("calories not in", values, "calories");
            return (Criteria) this;
        }

        public Criteria andCaloriesBetween(Integer value1, Integer value2) {
            addCriterion("calories between", value1, value2, "calories");
            return (Criteria) this;
        }

        public Criteria andCaloriesNotBetween(Integer value1, Integer value2) {
            addCriterion("calories not between", value1, value2, "calories");
            return (Criteria) this;
        }

        public Criteria andStartTimeIsNull() {
            addCriterion("start_time is null");
            return (Criteria) this;
        }

        public Criteria andStartTimeIsNotNull() {
            addCriterion("start_time is not null");
            return (Criteria) this;
        }

        public Criteria andStartTimeEqualTo(Date value) {
            addCriterion("start_time =", value, "startTime");
            return (Criteria) this;
        }

        public Criteria andStartTimeNotEqualTo(Date value) {
            addCriterion("start_time <>", value, "startTime");
            return (Criteria) this;
        }

        public Criteria andStartTimeGreaterThan(Date value) {
            addCriterion("start_time >", value, "startTime");
            return (Criteria) this;
        }

        public Criteria andStartTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("start_time >=", value, "startTime");
            return (Criteria) this;
        }

        public Criteria andStartTimeLessThan(Date value) {
            addCriterion("start_time <", value, "startTime");
            return (Criteria) this;
        }

        public Criteria andStartTimeLessThanOrEqualTo(Date value) {
            addCriterion("start_time <=", value, "startTime");
            return (Criteria) this;
        }

        public Criteria andStartTimeIn(List<Date> values) {
            addCriterion("start_time in", values, "startTime");
            return (Criteria) this;
        }

        public Criteria andStartTimeNotIn(List<Date> values) {
            addCriterion("start_time not in", values, "startTime");
            return (Criteria) this;
        }

        public Criteria andStartTimeBetween(Date value1, Date value2) {
            addCriterion("start_time between", value1, value2, "startTime");
            return (Criteria) this;
        }

        public Criteria andStartTimeNotBetween(Date value1, Date value2) {
            addCriterion("start_time not between", value1, value2, "startTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeIsNull() {
            addCriterion("end_time is null");
            return (Criteria) this;
        }

        public Criteria andEndTimeIsNotNull() {
            addCriterion("end_time is not null");
            return (Criteria) this;
        }

        public Criteria andEndTimeEqualTo(Date value) {
            addCriterion("end_time =", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeNotEqualTo(Date value) {
            addCriterion("end_time <>", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeGreaterThan(Date value) {
            addCriterion("end_time >", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("end_time >=", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeLessThan(Date value) {
            addCriterion("end_time <", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeLessThanOrEqualTo(Date value) {
            addCriterion("end_time <=", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeIn(List<Date> values) {
            addCriterion("end_time in", values, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeNotIn(List<Date> values) {
            addCriterion("end_time not in", values, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeBetween(Date value1, Date value2) {
            addCriterion("end_time between", value1, value2, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeNotBetween(Date value1, Date value2) {
            addCriterion("end_time not between", value1, value2, "endTime");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}